#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 设置所有需要远程操作的服务器
# remote host的ssh信息
# host: [username, password, port, server-ip]
class Server:
    # 远程主机列表 外网IP:[用户名，密码，端口，内网ip] 内网ip为实际ssh链接用地址，根据需要调整
    hosts = {
        '47.93.124.47': ['root', 'Safe@123', 22, '172.16.115.249'],
        '59.110.5.41': ['root', 'Safe@123', 22, '172.16.115.248']
    }

    # 发生错误的服务器Ip列表
    err_server = []

    # 添加错误服务器
    def add_err_server(self, ip):
        self.err_server.append(ip)

    # 打印错误服务器列表
    def print_error(self):
        for ip in self.err_server:
            print("\t %s" % ip)
